<?xml version="1.0" encoding="UTF-8"?>
<validateThis xsi:noNamespaceSchemaLocation="http://www.validatevariables.org/validateThis.xsd"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <conditions>
        <condition name="isApproved"
                   serverTest="getApproved() EQ true"/>
    </conditions>
    <objectProperties>
        <!-- Boolean: Missing value equates to false, no need to add required rules -->
        <property name="Deleted">
            <rule type="boolean" contexts="*" />
        </property>
        <property name="Approved">
            <rule type="boolean" contexts="*" />
        </property>
        <!-- Strings -->
        <property name="Payee_First_Name">
            <rule type="minLength" contexts="*">
                <param name="minLength" value="1" />
            </rule>
        </property>
        <property name="Payee_Last_Name">
            <rule type="minLength" contexts="*">
                <param name="minLength" value="1" />
            </rule>
        </property>
        <property name="Payee_Organization">
            <rule type="minLength" contexts="*">
                <param name="minLength" value="1" />
            </rule>
        </property>
        <property name="Payee_Address">
            <rule type="minLength" contexts="*">
                <param name="minLength" value="1" />
            </rule>
        </property>
        <property name="Payee_City">
            <rule type="minLength" contexts="*">
                <param name="minLength" value="1" />
            </rule>
        </property>
        <property name="Payee_Zip_Code">
            <rule type="postalcode" contexts="*" />
        </property>
        <property name="Payee_Phone">
            <rule type="telephone" contexts="*"/>
        </property>
        <property name="Payee_Email">
            <rule type="email" contexts="*" />
        </property>
		<property name="Signature">
            <rule type="required" contexts="*" />
            <rule type="minLength" contexts="*">
                <param name="minLength" value="3" />
            </rule>
        </property>
        <!-- integers -->
        <property name="Fund_ID">
            <rule type="required" contexts="*" />
            <rule type="integer" contexts="*" />
        </property>
        <property name="Organization_ID">
            <rule type="required" contexts="*" />
            <rule type="integer" contexts="*" />
            <rule type="min" contexts="*">
                <param name="min" value="1" />
            </rule>
        </property>
        <property name="Requested_By_ID">
            <rule type="required" contexts="*" />
            <rule type="integer" contexts="*" />
            <rule type="min" contexts="*">
                <param name="min" value="1" />
            </rule>
        </property>
        <property name="Approved_By_ID">
			<rule type="required" contexts="*" />
            <rule type="integer" contexts="*" />
        </property>
        <!-- dates -->
        <property name="Approved_Date">
            <rule type="date" contexts="*" />
        </property>
	</objectProperties>
</validateThis>
